<template>
<div class="list">
	<ul>
		<a class="list-ul-a" v-for="menu in menus">
			<router-link :to="menu.link"><li>{{menu.name}}</li></router-link>
			<a @click="controller()" class="list-ul-a"><li>后台管理</li></a>
		</a>
	</ul>
</div>
</template>

<script>
module.exports = {
	data : function() {
		return {
	    	menus: [
	        	{ name: '购票主页', link: '/index'},
	        	{ name: '查询车票', link: '/ticket'},
	           	{ name: '车票信息', link: '/adTicket'}
	        	]
			}
		},
		methods : {
			controller : function(){
				var str = prompt("请输入管理员密码");
				if(str!="123456"){
					alert("密码不正确");
					window.loaction.reload();
				}else{
					window.location.href ="./controller.html#/ticketController";
				}
			}
		}
	}
</script>
 
<style>
	body,ul,li,a{
		list-style:none;
		text-decoration:none;
		padding:0px;
		margin:0px;
	}
	a.list-ul-a:hover li{
		background-color:#FFFFFF;
	}
	.list{
		background-color:#1E90FF;
		width:auto;
		height:90px;
		padding-left:30px;
	}
	.list ul li{
		display:inline-block;
		height:60px;
		width:220px;
		padding-top:30px;
		padding-left:110px;
		font-size:23px;
	}
</style>